#include<stdio.h>
#include<stdbool.h>
#include<assert.h>
int main()
{
	int x = 0;
	int y = 0;
	int arr[23][23] = { 0 };
	int res[23][3] = { 0 };
	int count = 0;
	scanf("%d %d", &x, &y);
	//assert(x<=19&&y<=19);

	for (int i = 0; i < x; i++)
	{
		for (int j = 0; j < y; j++)
		{
			scanf("%d", &arr[i][j]);
		}
	}

	bool flag = false;
	for (int i = 1; i < x - 1; i++)
	{
		for (int j = 1; j < y - 1; j++)
		{
			if (arr[i][j] > arr[i][j + 1] && arr[i][j] > arr[i][j - 1] && arr[i][j] > arr[i - 1][j] && arr[i][j] > arr[i + 1][j])
			{
				res[count][0] = arr[i][j];
				res[count][1] = i + 1;
				res[count][2] = j + 1;
				count++;
				flag = true;
			}
		}
	}
	if (flag == false)
	{
		printf("None %d %d", x, y);
	}

	for (int i = 0; i < count; i++)
	{
		for (int j = 0; j < 3; j++)
		{
			if (j == 2) printf("%d", res[i][j]);
			else printf("%d ", res[i][j]);
		}
		printf("\n");
	}

	return 0;
}